<!DOCTYPE html>
<html>
<head>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/jsp/head.jsp"%>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/lib/bootstrap/css/bootstrap-tree.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/lib/bootstrap/css/bootstrap-table.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/lib/bootstrap/css/bootstrap-combobox.css">
<script src="${pageContext.request.contextPath}/static/js/lib/bootstrap/js/bootstrap-table.js"></script>
<script src="${pageContext.request.contextPath}/static/js/lib/bootstrap/js/bootstrap-tree.js"></script>
<script src="${pageContext.request.contextPath}/static/js/lib/bootstrap/js/bootstrap-menu.js"></script>
<script src="${pageContext.request.contextPath}/static/js/lib/bootstrap/js/bootstrap-combobox.js"></script>
<script src="${pageContext.request.contextPath}/static/js/menu.js"></script>
<script src="${pageContext.request.contextPath}/static/js/data/data.js"></script>
<script src="${pageContext.request.contextPath}/static/js/data/user.js"></script>
<script type="text/javascript">
$(function () {
	$("#remoteCombobox").BootstrapCombobox({
		url: basePath+'/BaGroupController/getGroupList',
        valueField: 'groupId',
        textField: 'groupName',
	});	
	
});

</script>
</head>

<body>  
	<div class="container">  
		<nav id="menu"></nav>
		
		<div class="panel panel-default">
	        <div class="panel-heading">远程加载下拉框</div>
			<div class="panel-body">
			    <div class="row">
			        <div class="col-xs-6">
			            <div id="remoteCombobox"></div>			        
			        </div>
			    </div>
		     </div>
		     <div class="panel-footer">
		                          远程加载下拉框简略说明：                                                                                                                                                            </br>
				$("#remoteCombobox").BootstrapCombobox({                   </br>
					url: basePath+'/BaGroupController/getGroupList',         </br>
			        valueField: 'groupId',                                   </br>
			        textField: 'groupName',                                </br>
				});                                                          </br>
				与简单下拉框不同的是，远程加载下拉框通过定义url属性来获取数据	                 </br>
				valueField指定远程数据的该字段为combobox的value值	                     </br>
				textField指定远程数据的该字段为combobox的text值                                                                                </br>	     
		     </div>	
	    </div>
		
    </div>
</body>

</html>